﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class Quit : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        var skidb = SkiWorldDataContext.GetInstance();
        HttpCookie ck = Request.Cookies["LOGIN"];
        if (ck != null)
        {
            Guid guid = Guid.Parse(ck.Value);
            LoginCookie lc = skidb.LoginCookies.First(l => l.GUID == guid);
            skidb.LoginCookies.DeleteOnSubmit(lc);
            skidb.SubmitChanges();
        }
    }
}